package fractal;

public enum Direction
{
  NORTH(0, -1), SOUTH(0, 1), WEST(-1, 0), EAST(1, 0), NORTH_WEST(-1, -1), NORTH_EAST(1, -1), SOUTH_WEST(-1, 1), SOUTH_EAST(1, 1), NO_DIRECTION(0, 0);

  private int vx;
  private int vy;

  private Direction(int vx, int vy)
  {
    this.vx = vx;
    this.vy = vy;
  }

  public int getNewX(int posx)
  {
    return posx + vx;
  }

  public int getNewY(int posy)
  {
    return posy + vy;
  }
}
